package com.artinapp.storyteller.ui;

import android.os.Build;
import android.os.Bundle;
import android.transition.Explode;
import android.view.ViewGroup;
import android.support.v4.app.FragmentTransaction;
import android.view.Window;

import com.artinapp.storyteller.R;

import butterknife.Bind;
import butterknife.ButterKnife;

public class SplashActivity extends BaseFragmentActivity {

    @Bind(R.id.frame_container) ViewGroup mRootView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (21 <= Build.VERSION.SDK_INT) {
            // inside your activity (if you did not enable transitions in your theme)
            getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);
            // set an exit transition
            getWindow().setExitTransition(new Explode());
        }
        setContentView(R.layout.activity_splash);
        ButterKnife.bind(this);

        SplashActivityFragment fragment = new SplashActivityFragment();

        FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
        transaction.replace(R.id.frame_container, fragment);
        transaction.commit();
    }

}
